
  ___  ____  ____  ____  ____ ®
 /__    /   ____/   /   ____/      18.0
___/   /   /___/   /   /___/       MP—Parallel Edition

 Statistics and Data Science       Copyright 1985-2023 StataCorp LLC
                                   StataCorp
                                   4905 Lakeway Drive
                                   College Station, Texas 77845 USA
                                   800-STATA-PC        https://www.stata.com
                                   979-696-4600        stata@stata.com

Stata license: 22-user 8-core network, expiring 30 Jun 2025
Serial number: 501809309427
  Licensed to: The University of Chicago Booth School of Business
               Mercury Computing Cluster

Notes:
      1. Stata is running in batch mode.
      2. Unicode is supported; see help unicode_advice.
      3. More than 2 billion observations are allowed; see help obs_advice.
      4. Maximum number of variables is set to 5,000 but can be increased;
          see help set_maxvar.

. do "/project/fagoolsb/git/service_industries/replication_package/builds/2_agg
> regates_build/2_1_aggregates_build.do" 

. * Author: Joe Tatarka
. * Name: 2_1_aggregates_build.do
. * Date Created: March 28, 2024
. * Purpose: Create aggregate dataset to create figures for the paper. Bring in
>  Census and BLS aggregate sales and employees and CPI deflators. Also bring i
> n aggregates from our SafeGraph sample.
. 
. * Set Global File Paths
. global raw_root = "/project/fagoolsb/service_industries/replication_package/d
> atasets/raw"

. global data_root = "/project/fagoolsb/service_industries/replication_package/
> datasets/built"

. 
. * set more off so 
. set more off 

. 
. ***************************************************************************
. *** Bring in inflation deflators 
. 
. ************************************
. **** Limited-Service Deflators (NSA)
. tempfile cpi_limited

. import excel "${raw_root}/cpi/limited_cpi_nsa_feb_2025.xlsx", clear firstrow 
> cellrange(A12:D349)
(4 vars, 337 obs)

. 
. rename *, lower

. drop seriesid 

. rename value cpi_limited

. drop if substr(period, 1,1) == "S"
(12 observations deleted)

. 
. replace period = substr(period,2,2)
(325 real changes made)

. destring period, replace 
period: all characters numeric; replaced as byte

. 
. gen year_month_gs = ym(year, period)

. format year_month_gs %tm

. 
. gen base = cpi_limited if year_month_gs == monthly("Jan2019", "MY")
(324 missing values generated)

. egen base_jan_2019 = max(base)

. 
. replace cpi_limited = 100*(cpi_limited/base_jan_2019)
(325 real changes made)

. 
. keep cpi_limited year_month_gs

. 
. save `cpi_limited', replace
(file /scratch/jtatarka/14534721/St3609585.000001 not found)
file /scratch/jtatarka/14534721/St3609585.000001 saved as .dta format

. 
. *************************************
. *** Food Away from Home deflator (NSA)
. tempfile cpi_food_nsa 

. 
. import excel "${raw_root}/cpi/food_away_cpi_nsa_feb_2025.xlsx", clear firstro
> w cellrange(A12:D472)
(4 vars, 460 obs)

. 
. rename *, lower

. drop seriesid 

. rename value cpi_food

. drop if substr(period, 1,1) == "S"
(64 observations deleted)

. 
. replace period = substr(period,2,2)
(396 real changes made)

. destring period, replace 
period: all characters numeric; replaced as byte

. 
. gen year_month_gs = ym(year, period)

. format year_month_gs %tm

. 
. gen double base = cpi_food if year_month_gs == monthly("Jan2019", "MY")
(395 missing values generated)

. egen double base_jan_2019 = max(base)

. 
. replace cpi_food = 100*(cpi_food/base_jan_2019)
(396 real changes made)

. 
. keep cpi_food year_month_gs

. rename cpi_food cpi_food_nsa

. 
. save `cpi_food_nsa', replace
(file /scratch/jtatarka/14534721/St3609585.000002 not found)
file /scratch/jtatarka/14534721/St3609585.000002 saved as .dta format

. 
. ***************************************
. *** Food Away from Home deflator (SA)
. tempfile cpi_food_sa 

. 
. import excel "${raw_root}/cpi/food_away_cpi_sa_feb_2025.xlsx", clear firstrow
>  cellrange(A12:D407)
(4 vars, 395 obs)

. 
. rename *, lower

. drop seriesid 

. rename value cpi_food

. drop if substr(period, 1,1) == "S"
(0 observations deleted)

. 
. replace period = substr(period,2,2)
(395 real changes made)

. destring period, replace 
period: all characters numeric; replaced as byte

. 
. gen year_month_gs = ym(year, period)

. format year_month_gs %tm

. 
. gen double base = cpi_food if year_month_gs == monthly("Jan2019", "MY")
(394 missing values generated)

. egen double base_jan_2019 = max(base)

. 
. replace cpi_food = 100*(cpi_food/base_jan_2019)
(395 real changes made)

. 
. keep cpi_food year_month_gs

. rename cpi_food cpi_food_sa

. 
. save `cpi_food_sa', replace
(file /scratch/jtatarka/14534721/St3609585.000003 not found)
file /scratch/jtatarka/14534721/St3609585.000003 saved as .dta format

. 
. 
. *** combine deflators
. tempfile deflators

. merge 1:1 year_month_gs using `cpi_limited', nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                            72
        from master                        71  
        from using                          1  

    Matched                               324  
    -----------------------------------------

. merge 1:1 year_month_gs using `cpi_food_nsa', nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               396  
    -----------------------------------------

. save `deflators', replace
(file /scratch/jtatarka/14534721/St3609585.000004 not found)
file /scratch/jtatarka/14534721/St3609585.000004 saved as .dta format

. 
. 
. ***********************************************
. **** Prepare Safegraph Aggregates
. ***********************************************
. * We want monthly aggregates of spend, emp, and visits for our main_build sam
> ple.
. use placekey year_month_gs spend nominal_spend visits emp using "${data_root}
> /main_build.dta", clear

. rename spend spend_sg

. rename visits visits_sg 

. rename emp emp_sg

. rename nominal_spend nominal_spend_sg

. tempfile sg

. collapse (sum) spend_sg visits_sg emp_sg nominal_spend_sg, by(year_month_gs)

. 
. save `sg', replace
(file /scratch/jtatarka/14534721/St3609585.000005 not found)
file /scratch/jtatarka/14534721/St3609585.000005 saved as .dta format

. 
. *****************************************************************************
> ***
. ******* Bring in Census data
. *****************************************************************************
> ***
. ******* Census monthly sales 
. 
. forval yr = 1992/2023 {
  2.         
.         tempfile census_`yr'
  3.         import excel "${raw_root}/census_monthly_retail_trade/mrtssales92-
> present_feb_2025.xlsx", clear firstrow sheet("`yr'") cellrange(B5:O110)
  4.         replace B = "food_nsa" if _n == 62
  5.         replace B = "limited" if _n == 66
  6.         replace B = "food_sa" if _n == 105
  7.         keep if _n == 62 | _n == 66 | _n == 105
  8.         drop TOTAL
  9.         
.         foreach var of varlist _all {
 10.                 rename `var' sales_prelim`var'
 11.         }
 12.         
.         rename sales_prelimB rest_type
 13. destring sales_prelimJan`yr'-sales_prelimDec`yr', replace
 14. reshape long sales_prelim, i(rest_type) j(year_month_prelim) string
 15. 
. destring sales_prelim, replace
 16. gen year_month_gs = monthly(year_month_prelim, "MY")
 17. format year_month_gs %tm
 18. drop year_month_prelim
 19. reshape wide sales_prelim, i(year_month_gs) j(rest_type) string
 20. reshape long
 21. replace sales_prelim = (sales_prelim*1000000)
 22. format sales_prelim %15.0g
 23. rename sales_prelim spend_
 24. 
. reshape wide spend_, i(year_month_gs) j(rest_type) string
 25.         
.         save `census_`yr'', replace
 26. }
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1992: all characters numeric; replaced as int
sales_prelimFeb1992: all characters numeric; replaced as int
sales_prelimMar1992: all characters numeric; replaced as int
sales_prelimApr1992: all characters numeric; replaced as int
sales_prelimMay1992: all characters numeric; replaced as int
sales_prelimJun1992: all characters numeric; replaced as int
sales_prelimJul1992: all characters numeric; replaced as int
sales_prelimAug1992: all characters numeric; replaced as int
sales_prelimSep1992: all characters numeric; replaced as int
sales_prelimOct1992: all characters numeric; replaced as int
sales_prelimNov1992: all characters numeric; replaced as int
sales_prelimDec1992: all characters numeric; replaced as int
(j = Apr1992 Aug1992 Dec1992 Feb1992 Jan1992 Jul1992 Jun1992 Mar1992 May1992 No
> v1992 Oct1992 Sep1992)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1992 sales_prelimAug1992 ... sales_prelimSep1992->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000006 not found)
file /scratch/jtatarka/14534721/St3609585.000006 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1993: all characters numeric; replaced as int
sales_prelimFeb1993: all characters numeric; replaced as int
sales_prelimMar1993: all characters numeric; replaced as int
sales_prelimApr1993: all characters numeric; replaced as int
sales_prelimMay1993: all characters numeric; replaced as int
sales_prelimJun1993: all characters numeric; replaced as int
sales_prelimJul1993: all characters numeric; replaced as int
sales_prelimAug1993: all characters numeric; replaced as int
sales_prelimSep1993: all characters numeric; replaced as int
sales_prelimOct1993: all characters numeric; replaced as int
sales_prelimNov1993: all characters numeric; replaced as int
sales_prelimDec1993: all characters numeric; replaced as int
(j = Apr1993 Aug1993 Dec1993 Feb1993 Jan1993 Jul1993 Jun1993 Mar1993 May1993 No
> v1993 Oct1993 Sep1993)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1993 sales_prelimAug1993 ... sales_prelimSep1993->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000007 not found)
file /scratch/jtatarka/14534721/St3609585.000007 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1994: all characters numeric; replaced as int
sales_prelimFeb1994: all characters numeric; replaced as int
sales_prelimMar1994: all characters numeric; replaced as int
sales_prelimApr1994: all characters numeric; replaced as int
sales_prelimMay1994: all characters numeric; replaced as int
sales_prelimJun1994: all characters numeric; replaced as int
sales_prelimJul1994: all characters numeric; replaced as int
sales_prelimAug1994: all characters numeric; replaced as int
sales_prelimSep1994: all characters numeric; replaced as int
sales_prelimOct1994: all characters numeric; replaced as int
sales_prelimNov1994: all characters numeric; replaced as int
sales_prelimDec1994: all characters numeric; replaced as int
(j = Apr1994 Aug1994 Dec1994 Feb1994 Jan1994 Jul1994 Jun1994 Mar1994 May1994 No
> v1994 Oct1994 Sep1994)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1994 sales_prelimAug1994 ... sales_prelimSep1994->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000008 not found)
file /scratch/jtatarka/14534721/St3609585.000008 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1995: all characters numeric; replaced as int
sales_prelimFeb1995: all characters numeric; replaced as int
sales_prelimMar1995: all characters numeric; replaced as int
sales_prelimApr1995: all characters numeric; replaced as int
sales_prelimMay1995: all characters numeric; replaced as int
sales_prelimJun1995: all characters numeric; replaced as int
sales_prelimJul1995: all characters numeric; replaced as int
sales_prelimAug1995: all characters numeric; replaced as int
sales_prelimSep1995: all characters numeric; replaced as int
sales_prelimOct1995: all characters numeric; replaced as int
sales_prelimNov1995: all characters numeric; replaced as int
sales_prelimDec1995: all characters numeric; replaced as int
(j = Apr1995 Aug1995 Dec1995 Feb1995 Jan1995 Jul1995 Jun1995 Mar1995 May1995 No
> v1995 Oct1995 Sep1995)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1995 sales_prelimAug1995 ... sales_prelimSep1995->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000009 not found)
file /scratch/jtatarka/14534721/St3609585.000009 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1996: all characters numeric; replaced as int
sales_prelimFeb1996: all characters numeric; replaced as int
sales_prelimMar1996: all characters numeric; replaced as int
sales_prelimApr1996: all characters numeric; replaced as int
sales_prelimMay1996: all characters numeric; replaced as int
sales_prelimJun1996: all characters numeric; replaced as int
sales_prelimJul1996: all characters numeric; replaced as int
sales_prelimAug1996: all characters numeric; replaced as int
sales_prelimSep1996: all characters numeric; replaced as int
sales_prelimOct1996: all characters numeric; replaced as int
sales_prelimNov1996: all characters numeric; replaced as int
sales_prelimDec1996: all characters numeric; replaced as int
(j = Apr1996 Aug1996 Dec1996 Feb1996 Jan1996 Jul1996 Jun1996 Mar1996 May1996 No
> v1996 Oct1996 Sep1996)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1996 sales_prelimAug1996 ... sales_prelimSep1996->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000a not found)
file /scratch/jtatarka/14534721/St3609585.00000a saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1997: all characters numeric; replaced as int
sales_prelimFeb1997: all characters numeric; replaced as int
sales_prelimMar1997: all characters numeric; replaced as int
sales_prelimApr1997: all characters numeric; replaced as int
sales_prelimMay1997: all characters numeric; replaced as int
sales_prelimJun1997: all characters numeric; replaced as int
sales_prelimJul1997: all characters numeric; replaced as int
sales_prelimAug1997: all characters numeric; replaced as int
sales_prelimSep1997: all characters numeric; replaced as int
sales_prelimOct1997: all characters numeric; replaced as int
sales_prelimNov1997: all characters numeric; replaced as int
sales_prelimDec1997: all characters numeric; replaced as int
(j = Apr1997 Aug1997 Dec1997 Feb1997 Jan1997 Jul1997 Jun1997 Mar1997 May1997 No
> v1997 Oct1997 Sep1997)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1997 sales_prelimAug1997 ... sales_prelimSep1997->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000b not found)
file /scratch/jtatarka/14534721/St3609585.00000b saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1998: all characters numeric; replaced as int
sales_prelimFeb1998: all characters numeric; replaced as int
sales_prelimMar1998: all characters numeric; replaced as int
sales_prelimApr1998: all characters numeric; replaced as int
sales_prelimMay1998: all characters numeric; replaced as int
sales_prelimJun1998: all characters numeric; replaced as int
sales_prelimJul1998: all characters numeric; replaced as int
sales_prelimAug1998: all characters numeric; replaced as int
sales_prelimSep1998: all characters numeric; replaced as int
sales_prelimOct1998: all characters numeric; replaced as int
sales_prelimNov1998: all characters numeric; replaced as int
sales_prelimDec1998: all characters numeric; replaced as int
(j = Apr1998 Aug1998 Dec1998 Feb1998 Jan1998 Jul1998 Jun1998 Mar1998 May1998 No
> v1998 Oct1998 Sep1998)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1998 sales_prelimAug1998 ... sales_prelimSep1998->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000c not found)
file /scratch/jtatarka/14534721/St3609585.00000c saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan1999: all characters numeric; replaced as int
sales_prelimFeb1999: all characters numeric; replaced as int
sales_prelimMar1999: all characters numeric; replaced as int
sales_prelimApr1999: all characters numeric; replaced as int
sales_prelimMay1999: all characters numeric; replaced as int
sales_prelimJun1999: all characters numeric; replaced as int
sales_prelimJul1999: all characters numeric; replaced as int
sales_prelimAug1999: all characters numeric; replaced as int
sales_prelimSep1999: all characters numeric; replaced as int
sales_prelimOct1999: all characters numeric; replaced as int
sales_prelimNov1999: all characters numeric; replaced as int
sales_prelimDec1999: all characters numeric; replaced as int
(j = Apr1999 Aug1999 Dec1999 Feb1999 Jan1999 Jul1999 Jun1999 Mar1999 May1999 No
> v1999 Oct1999 Sep1999)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr1999 sales_prelimAug1999 ... sales_prelimSep1999->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000d not found)
file /scratch/jtatarka/14534721/St3609585.00000d saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2000: all characters numeric; replaced as int
sales_prelimFeb2000: all characters numeric; replaced as int
sales_prelimMar2000: all characters numeric; replaced as int
sales_prelimApr2000: all characters numeric; replaced as int
sales_prelimMay2000: all characters numeric; replaced as int
sales_prelimJun2000: all characters numeric; replaced as int
sales_prelimJul2000: all characters numeric; replaced as int
sales_prelimAug2000: all characters numeric; replaced as int
sales_prelimSep2000: all characters numeric; replaced as int
sales_prelimOct2000: all characters numeric; replaced as int
sales_prelimNov2000: all characters numeric; replaced as int
sales_prelimDec2000: all characters numeric; replaced as int
(j = Apr2000 Aug2000 Dec2000 Feb2000 Jan2000 Jul2000 Jun2000 Mar2000 May2000 No
> v2000 Oct2000 Sep2000)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2000 sales_prelimAug2000 ... sales_prelimSep2000->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was int now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000e not found)
file /scratch/jtatarka/14534721/St3609585.00000e saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2001 already numeric; no replace
sales_prelimFeb2001 already numeric; no replace
sales_prelimMar2001 already numeric; no replace
sales_prelimApr2001 already numeric; no replace
sales_prelimMay2001 already numeric; no replace
sales_prelimJun2001 already numeric; no replace
sales_prelimJul2001 already numeric; no replace
sales_prelimAug2001 already numeric; no replace
sales_prelimSep2001 already numeric; no replace
sales_prelimOct2001 already numeric; no replace
sales_prelimNov2001 already numeric; no replace
sales_prelimDec2001 already numeric; no replace
(j = Apr2001 Aug2001 Dec2001 Feb2001 Jan2001 Jul2001 Jun2001 Mar2001 May2001 No
> v2001 Oct2001 Sep2001)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2001 sales_prelimAug2001 ... sales_prelimSep2001->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000f not found)
file /scratch/jtatarka/14534721/St3609585.00000f saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2002 already numeric; no replace
sales_prelimFeb2002 already numeric; no replace
sales_prelimMar2002 already numeric; no replace
sales_prelimApr2002 already numeric; no replace
sales_prelimMay2002 already numeric; no replace
sales_prelimJun2002 already numeric; no replace
sales_prelimJul2002 already numeric; no replace
sales_prelimAug2002 already numeric; no replace
sales_prelimSep2002 already numeric; no replace
sales_prelimOct2002 already numeric; no replace
sales_prelimNov2002 already numeric; no replace
sales_prelimDec2002 already numeric; no replace
(j = Apr2002 Aug2002 Dec2002 Feb2002 Jan2002 Jul2002 Jun2002 Mar2002 May2002 No
> v2002 Oct2002 Sep2002)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2002 sales_prelimAug2002 ... sales_prelimSep2002->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000g not found)
file /scratch/jtatarka/14534721/St3609585.00000g saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2003 already numeric; no replace
sales_prelimFeb2003 already numeric; no replace
sales_prelimMar2003 already numeric; no replace
sales_prelimApr2003 already numeric; no replace
sales_prelimMay2003 already numeric; no replace
sales_prelimJun2003 already numeric; no replace
sales_prelimJul2003 already numeric; no replace
sales_prelimAug2003 already numeric; no replace
sales_prelimSep2003 already numeric; no replace
sales_prelimOct2003 already numeric; no replace
sales_prelimNov2003 already numeric; no replace
sales_prelimDec2003 already numeric; no replace
(j = Apr2003 Aug2003 Dec2003 Feb2003 Jan2003 Jul2003 Jun2003 Mar2003 May2003 No
> v2003 Oct2003 Sep2003)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2003 sales_prelimAug2003 ... sales_prelimSep2003->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000h not found)
file /scratch/jtatarka/14534721/St3609585.00000h saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2004 already numeric; no replace
sales_prelimFeb2004 already numeric; no replace
sales_prelimMar2004 already numeric; no replace
sales_prelimApr2004 already numeric; no replace
sales_prelimMay2004 already numeric; no replace
sales_prelimJun2004 already numeric; no replace
sales_prelimJul2004 already numeric; no replace
sales_prelimAug2004 already numeric; no replace
sales_prelimSep2004 already numeric; no replace
sales_prelimOct2004 already numeric; no replace
sales_prelimNov2004 already numeric; no replace
sales_prelimDec2004 already numeric; no replace
(j = Apr2004 Aug2004 Dec2004 Feb2004 Jan2004 Jul2004 Jun2004 Mar2004 May2004 No
> v2004 Oct2004 Sep2004)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2004 sales_prelimAug2004 ... sales_prelimSep2004->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000i not found)
file /scratch/jtatarka/14534721/St3609585.00000i saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2005 already numeric; no replace
sales_prelimFeb2005 already numeric; no replace
sales_prelimMar2005 already numeric; no replace
sales_prelimApr2005 already numeric; no replace
sales_prelimMay2005 already numeric; no replace
sales_prelimJun2005 already numeric; no replace
sales_prelimJul2005 already numeric; no replace
sales_prelimAug2005 already numeric; no replace
sales_prelimSep2005 already numeric; no replace
sales_prelimOct2005 already numeric; no replace
sales_prelimNov2005 already numeric; no replace
sales_prelimDec2005 already numeric; no replace
(j = Apr2005 Aug2005 Dec2005 Feb2005 Jan2005 Jul2005 Jun2005 Mar2005 May2005 No
> v2005 Oct2005 Sep2005)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2005 sales_prelimAug2005 ... sales_prelimSep2005->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000j not found)
file /scratch/jtatarka/14534721/St3609585.00000j saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2006 already numeric; no replace
sales_prelimFeb2006 already numeric; no replace
sales_prelimMar2006 already numeric; no replace
sales_prelimApr2006 already numeric; no replace
sales_prelimMay2006 already numeric; no replace
sales_prelimJun2006 already numeric; no replace
sales_prelimJul2006 already numeric; no replace
sales_prelimAug2006 already numeric; no replace
sales_prelimSep2006 already numeric; no replace
sales_prelimOct2006 already numeric; no replace
sales_prelimNov2006 already numeric; no replace
sales_prelimDec2006 already numeric; no replace
(j = Apr2006 Aug2006 Dec2006 Feb2006 Jan2006 Jul2006 Jun2006 Mar2006 May2006 No
> v2006 Oct2006 Sep2006)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2006 sales_prelimAug2006 ... sales_prelimSep2006->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000k not found)
file /scratch/jtatarka/14534721/St3609585.00000k saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2007 already numeric; no replace
sales_prelimFeb2007 already numeric; no replace
sales_prelimMar2007 already numeric; no replace
sales_prelimApr2007 already numeric; no replace
sales_prelimMay2007 already numeric; no replace
sales_prelimJun2007 already numeric; no replace
sales_prelimJul2007 already numeric; no replace
sales_prelimAug2007 already numeric; no replace
sales_prelimSep2007 already numeric; no replace
sales_prelimOct2007 already numeric; no replace
sales_prelimNov2007 already numeric; no replace
sales_prelimDec2007 already numeric; no replace
(j = Apr2007 Aug2007 Dec2007 Feb2007 Jan2007 Jul2007 Jun2007 Mar2007 May2007 No
> v2007 Oct2007 Sep2007)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2007 sales_prelimAug2007 ... sales_prelimSep2007->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000l not found)
file /scratch/jtatarka/14534721/St3609585.00000l saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2008 already numeric; no replace
sales_prelimFeb2008 already numeric; no replace
sales_prelimMar2008 already numeric; no replace
sales_prelimApr2008 already numeric; no replace
sales_prelimMay2008 already numeric; no replace
sales_prelimJun2008 already numeric; no replace
sales_prelimJul2008 already numeric; no replace
sales_prelimAug2008 already numeric; no replace
sales_prelimSep2008 already numeric; no replace
sales_prelimOct2008 already numeric; no replace
sales_prelimNov2008 already numeric; no replace
sales_prelimDec2008 already numeric; no replace
(j = Apr2008 Aug2008 Dec2008 Feb2008 Jan2008 Jul2008 Jun2008 Mar2008 May2008 No
> v2008 Oct2008 Sep2008)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2008 sales_prelimAug2008 ... sales_prelimSep2008->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000m not found)
file /scratch/jtatarka/14534721/St3609585.00000m saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2009 already numeric; no replace
sales_prelimFeb2009 already numeric; no replace
sales_prelimMar2009 already numeric; no replace
sales_prelimApr2009 already numeric; no replace
sales_prelimMay2009 already numeric; no replace
sales_prelimJun2009 already numeric; no replace
sales_prelimJul2009 already numeric; no replace
sales_prelimAug2009 already numeric; no replace
sales_prelimSep2009 already numeric; no replace
sales_prelimOct2009 already numeric; no replace
sales_prelimNov2009 already numeric; no replace
sales_prelimDec2009 already numeric; no replace
(j = Apr2009 Aug2009 Dec2009 Feb2009 Jan2009 Jul2009 Jun2009 Mar2009 May2009 No
> v2009 Oct2009 Sep2009)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2009 sales_prelimAug2009 ... sales_prelimSep2009->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000n not found)
file /scratch/jtatarka/14534721/St3609585.00000n saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2010 already numeric; no replace
sales_prelimFeb2010 already numeric; no replace
sales_prelimMar2010 already numeric; no replace
sales_prelimApr2010 already numeric; no replace
sales_prelimMay2010 already numeric; no replace
sales_prelimJun2010 already numeric; no replace
sales_prelimJul2010 already numeric; no replace
sales_prelimAug2010 already numeric; no replace
sales_prelimSep2010 already numeric; no replace
sales_prelimOct2010 already numeric; no replace
sales_prelimNov2010 already numeric; no replace
sales_prelimDec2010 already numeric; no replace
(j = Apr2010 Aug2010 Dec2010 Feb2010 Jan2010 Jul2010 Jun2010 Mar2010 May2010 No
> v2010 Oct2010 Sep2010)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2010 sales_prelimAug2010 ... sales_prelimSep2010->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000o not found)
file /scratch/jtatarka/14534721/St3609585.00000o saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2011 already numeric; no replace
sales_prelimFeb2011 already numeric; no replace
sales_prelimMar2011 already numeric; no replace
sales_prelimApr2011 already numeric; no replace
sales_prelimMay2011 already numeric; no replace
sales_prelimJun2011 already numeric; no replace
sales_prelimJul2011 already numeric; no replace
sales_prelimAug2011 already numeric; no replace
sales_prelimSep2011 already numeric; no replace
sales_prelimOct2011 already numeric; no replace
sales_prelimNov2011 already numeric; no replace
sales_prelimDec2011 already numeric; no replace
(j = Apr2011 Aug2011 Dec2011 Feb2011 Jan2011 Jul2011 Jun2011 Mar2011 May2011 No
> v2011 Oct2011 Sep2011)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2011 sales_prelimAug2011 ... sales_prelimSep2011->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000p not found)
file /scratch/jtatarka/14534721/St3609585.00000p saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2012 already numeric; no replace
sales_prelimFeb2012 already numeric; no replace
sales_prelimMar2012 already numeric; no replace
sales_prelimApr2012 already numeric; no replace
sales_prelimMay2012 already numeric; no replace
sales_prelimJun2012 already numeric; no replace
sales_prelimJul2012 already numeric; no replace
sales_prelimAug2012 already numeric; no replace
sales_prelimSep2012 already numeric; no replace
sales_prelimOct2012 already numeric; no replace
sales_prelimNov2012 already numeric; no replace
sales_prelimDec2012 already numeric; no replace
(j = Apr2012 Aug2012 Dec2012 Feb2012 Jan2012 Jul2012 Jun2012 Mar2012 May2012 No
> v2012 Oct2012 Sep2012)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2012 sales_prelimAug2012 ... sales_prelimSep2012->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000q not found)
file /scratch/jtatarka/14534721/St3609585.00000q saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2013 already numeric; no replace
sales_prelimFeb2013 already numeric; no replace
sales_prelimMar2013 already numeric; no replace
sales_prelimApr2013 already numeric; no replace
sales_prelimMay2013 already numeric; no replace
sales_prelimJun2013 already numeric; no replace
sales_prelimJul2013 already numeric; no replace
sales_prelimAug2013 already numeric; no replace
sales_prelimSep2013 already numeric; no replace
sales_prelimOct2013 already numeric; no replace
sales_prelimNov2013 already numeric; no replace
sales_prelimDec2013 already numeric; no replace
(j = Apr2013 Aug2013 Dec2013 Feb2013 Jan2013 Jul2013 Jun2013 Mar2013 May2013 No
> v2013 Oct2013 Sep2013)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2013 sales_prelimAug2013 ... sales_prelimSep2013->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000r not found)
file /scratch/jtatarka/14534721/St3609585.00000r saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2014 already numeric; no replace
sales_prelimFeb2014 already numeric; no replace
sales_prelimMar2014 already numeric; no replace
sales_prelimApr2014 already numeric; no replace
sales_prelimMay2014 already numeric; no replace
sales_prelimJun2014 already numeric; no replace
sales_prelimJul2014 already numeric; no replace
sales_prelimAug2014 already numeric; no replace
sales_prelimSep2014 already numeric; no replace
sales_prelimOct2014 already numeric; no replace
sales_prelimNov2014 already numeric; no replace
sales_prelimDec2014 already numeric; no replace
(j = Apr2014 Aug2014 Dec2014 Feb2014 Jan2014 Jul2014 Jun2014 Mar2014 May2014 No
> v2014 Oct2014 Sep2014)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2014 sales_prelimAug2014 ... sales_prelimSep2014->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000s not found)
file /scratch/jtatarka/14534721/St3609585.00000s saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2015 already numeric; no replace
sales_prelimFeb2015 already numeric; no replace
sales_prelimMar2015 already numeric; no replace
sales_prelimApr2015 already numeric; no replace
sales_prelimMay2015 already numeric; no replace
sales_prelimJun2015 already numeric; no replace
sales_prelimJul2015 already numeric; no replace
sales_prelimAug2015 already numeric; no replace
sales_prelimSep2015 already numeric; no replace
sales_prelimOct2015 already numeric; no replace
sales_prelimNov2015 already numeric; no replace
sales_prelimDec2015 already numeric; no replace
(j = Apr2015 Aug2015 Dec2015 Feb2015 Jan2015 Jul2015 Jun2015 Mar2015 May2015 No
> v2015 Oct2015 Sep2015)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2015 sales_prelimAug2015 ... sales_prelimSep2015->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000t not found)
file /scratch/jtatarka/14534721/St3609585.00000t saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2016 already numeric; no replace
sales_prelimFeb2016 already numeric; no replace
sales_prelimMar2016 already numeric; no replace
sales_prelimApr2016 already numeric; no replace
sales_prelimMay2016 already numeric; no replace
sales_prelimJun2016 already numeric; no replace
sales_prelimJul2016 already numeric; no replace
sales_prelimAug2016 already numeric; no replace
sales_prelimSep2016 already numeric; no replace
sales_prelimOct2016 already numeric; no replace
sales_prelimNov2016 already numeric; no replace
sales_prelimDec2016 already numeric; no replace
(j = Apr2016 Aug2016 Dec2016 Feb2016 Jan2016 Jul2016 Jun2016 Mar2016 May2016 No
> v2016 Oct2016 Sep2016)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2016 sales_prelimAug2016 ... sales_prelimSep2016->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000u not found)
file /scratch/jtatarka/14534721/St3609585.00000u saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2017 already numeric; no replace
sales_prelimFeb2017 already numeric; no replace
sales_prelimMar2017: all characters numeric; replaced as long
sales_prelimApr2017: all characters numeric; replaced as long
sales_prelimMay2017: all characters numeric; replaced as long
sales_prelimJun2017: all characters numeric; replaced as long
sales_prelimJul2017: all characters numeric; replaced as long
sales_prelimAug2017: all characters numeric; replaced as long
sales_prelimSep2017: all characters numeric; replaced as long
sales_prelimOct2017: all characters numeric; replaced as long
sales_prelimNov2017: all characters numeric; replaced as long
sales_prelimDec2017: all characters numeric; replaced as long
(j = Apr2017 Aug2017 Dec2017 Feb2017 Jan2017 Jul2017 Jun2017 Mar2017 May2017 No
> v2017 Oct2017 Sep2017)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2017 sales_prelimAug2017 ... sales_prelimSep2017->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000v not found)
file /scratch/jtatarka/14534721/St3609585.00000v saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2018: all characters numeric; replaced as long
sales_prelimFeb2018: all characters numeric; replaced as long
sales_prelimMar2018: all characters numeric; replaced as long
sales_prelimApr2018: all characters numeric; replaced as long
sales_prelimMay2018: all characters numeric; replaced as long
sales_prelimJun2018: all characters numeric; replaced as long
sales_prelimJul2018: all characters numeric; replaced as long
sales_prelimAug2018: all characters numeric; replaced as long
sales_prelimSep2018: all characters numeric; replaced as long
sales_prelimOct2018: all characters numeric; replaced as long
sales_prelimNov2018: all characters numeric; replaced as long
sales_prelimDec2018: all characters numeric; replaced as long
(j = Apr2018 Aug2018 Dec2018 Feb2018 Jan2018 Jul2018 Jun2018 Mar2018 May2018 No
> v2018 Oct2018 Sep2018)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2018 sales_prelimAug2018 ... sales_prelimSep2018->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000w not found)
file /scratch/jtatarka/14534721/St3609585.00000w saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2019: all characters numeric; replaced as long
sales_prelimFeb2019: all characters numeric; replaced as long
sales_prelimMar2019: all characters numeric; replaced as long
sales_prelimApr2019: all characters numeric; replaced as long
sales_prelimMay2019: all characters numeric; replaced as long
sales_prelimJun2019: all characters numeric; replaced as long
sales_prelimJul2019: all characters numeric; replaced as long
sales_prelimAug2019: all characters numeric; replaced as long
sales_prelimSep2019: all characters numeric; replaced as long
sales_prelimOct2019: all characters numeric; replaced as long
sales_prelimNov2019: all characters numeric; replaced as long
sales_prelimDec2019: all characters numeric; replaced as long
(j = Apr2019 Aug2019 Dec2019 Feb2019 Jan2019 Jul2019 Jun2019 Mar2019 May2019 No
> v2019 Oct2019 Sep2019)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2019 sales_prelimAug2019 ... sales_prelimSep2019->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.00000x not found)
file /scratch/jtatarka/14534721/St3609585.00000x saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2020: all characters numeric; replaced as long
sales_prelimFeb2020: all characters numeric; replaced as long
sales_prelimMar2020: all characters numeric; replaced as long
sales_prelimApr2020: all characters numeric; replaced as int
sales_prelimMay2020: all characters numeric; replaced as long
sales_prelimJun2020: all characters numeric; replaced as long
sales_prelimJul2020: all characters numeric; replaced as long
sales_prelimAug2020: all characters numeric; replaced as long
sales_prelimSep2020: all characters numeric; replaced as long
sales_prelimOct2020: all characters numeric; replaced as long
sales_prelimNov2020: all characters numeric; replaced as long
sales_prelimDec2020: all characters numeric; replaced as long
(j = Apr2020 Aug2020 Dec2020 Feb2020 Jan2020 Jul2020 Jun2020 Mar2020 May2020 No
> v2020 Oct2020 Sep2020)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2020 sales_prelimAug2020 ... sales_prelimSep2020->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000010 not found)
file /scratch/jtatarka/14534721/St3609585.000010 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2021: all characters numeric; replaced as long
sales_prelimFeb2021: all characters numeric; replaced as long
sales_prelimMar2021: all characters numeric; replaced as long
sales_prelimApr2021: all characters numeric; replaced as long
sales_prelimMay2021: all characters numeric; replaced as long
sales_prelimJun2021: all characters numeric; replaced as long
sales_prelimJul2021: all characters numeric; replaced as long
sales_prelimAug2021: all characters numeric; replaced as long
sales_prelimSep2021: all characters numeric; replaced as long
sales_prelimOct2021: all characters numeric; replaced as long
sales_prelimNov2021: all characters numeric; replaced as long
sales_prelimDec2021: all characters numeric; replaced as long
(j = Apr2021 Aug2021 Dec2021 Feb2021 Jan2021 Jul2021 Jun2021 Mar2021 May2021 No
> v2021 Oct2021 Sep2021)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2021 sales_prelimAug2021 ... sales_prelimSep2021->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000011 not found)
file /scratch/jtatarka/14534721/St3609585.000011 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2022: all characters numeric; replaced as long
sales_prelimFeb2022: all characters numeric; replaced as long
sales_prelimMar2022: all characters numeric; replaced as long
sales_prelimApr2022: all characters numeric; replaced as long
sales_prelimMay2022: all characters numeric; replaced as long
sales_prelimJun2022: all characters numeric; replaced as long
sales_prelimJul2022: all characters numeric; replaced as long
sales_prelimAug2022: all characters numeric; replaced as long
sales_prelimSep2022: all characters numeric; replaced as long
sales_prelimOct2022: all characters numeric; replaced as long
sales_prelimNov2022: all characters numeric; replaced as long
sales_prelimDec2022: all characters numeric; replaced as long
(j = Apr2022 Aug2022 Dec2022 Feb2022 Jan2022 Jul2022 Jun2022 Mar2022 May2022 No
> v2022 Oct2022 Sep2022)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2022 sales_prelimAug2022 ... sales_prelimSep2022->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000012 not found)
file /scratch/jtatarka/14534721/St3609585.000012 saved as .dta format
(14 vars, 105 obs)
(1 real change made)
(1 real change made)
(1 real change made)
(102 observations deleted)
sales_prelimJan2023: all characters numeric; replaced as long
sales_prelimFeb2023: all characters numeric; replaced as long
sales_prelimMar2023: all characters numeric; replaced as long
sales_prelimApr2023: all characters numeric; replaced as long
sales_prelimMay2023: all characters numeric; replaced as long
sales_prelimJun2023: all characters numeric; replaced as long
sales_prelimJul2023: all characters numeric; replaced as long
sales_prelimAug2023: all characters numeric; replaced as long
sales_prelimSep2023: all characters numeric; replaced as long
sales_prelimOct2023: all characters numeric; replaced as long
sales_prelimNov2023: all characters numeric; replaced as long
sales_prelimDec2023: all characters numeric; replaced as long
(j = Apr2023 Aug2023 Dec2023 Feb2023 Jan2023 Jul2023 Jun2023 Mar2023 May2023 No
> v2023 Oct2023 Sep2023)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   36          
Number of variables                  13   ->   3           
j variable (12 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2023 sales_prelimAug2023 ... sales_prelimSep2023->sales_prelim
-----------------------------------------------------------------------------
sales_prelim already numeric; no replace
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               12   ->   36          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------
variable sales_prelim was long now double
(36 real changes made)
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               36   ->   12          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------
(file /scratch/jtatarka/14534721/St3609585.000013 not found)
file /scratch/jtatarka/14534721/St3609585.000013 saved as .dta format

. 
. *** 2024 still preliminary data 
. tempfile census_2024

. import excel "${raw_root}/census_monthly_retail_trade/mrtssales92-present_feb
> _2025.xlsx", clear firstrow sheet("`yr'") cellrange(B5:O110)
(14 vars, 105 obs)

. replace B = "food_nsa" if _n == 62
(1 real change made)

. replace B = "limited" if _n == 66
(1 real change made)

. replace B = "food_sa" if _n == 105
(1 real change made)

. keep if _n == 62 | _n == 66 | _n == 105
(102 observations deleted)

. drop CYCUM PYCUM 

. rename Nov2024p Nov2024

.         
. foreach var of varlist _all {
  2.         rename `var' sales_prelim`var'
  3. }

.         
. rename sales_prelimB rest_type

. 
. reshape long sales_prelim, i(rest_type) j(year_month_prelim) string
(j = Apr2024 Aug2024 Feb2024 Jan2024 Jul2024 Jun2024 Mar2024 May2024 Nov2024 Oc
> t2024 Sep2024)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations                3   ->   33          
Number of variables                  12   ->   3           
j variable (11 values)                    ->   year_month_prelim
xij variables:
sales_prelimApr2024 sales_prelimAug2024 ... sales_prelimSep2024->sales_prelim
-----------------------------------------------------------------------------

. replace sales_prelim = "" if sales_prelim == "(S)"
(0 real changes made)

. 
. destring sales_prelim, replace
sales_prelim: all characters numeric; replaced as long

. gen year_month_gs = monthly(year_month_prelim, "MY")

. format year_month_gs %tm

. drop year_month_prelim

. reshape wide sales_prelim, i(year_month_gs) j(rest_type) string
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               33   ->   11          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                           sales_prelim   ->   sales_prelimfood_nsa sales_preli
> mfood_sa sales_prelimlimited
-----------------------------------------------------------------------------

. reshape long
(j = food_nsa food_sa limited)

Data                               Wide   ->   Long
-----------------------------------------------------------------------------
Number of observations               11   ->   33          
Number of variables                   4   ->   3           
j variable (3 values)                     ->   rest_type
xij variables:
sales_prelimfood_nsa sales_prelimfood_sa sales_prelimlimited->sales_prelim
-----------------------------------------------------------------------------

. replace sales_prelim = (sales_prelim*1000000)
variable sales_prelim was long now double
(33 real changes made)

. format sales_prelim %15.0g

. rename sales_prelim spend_

. 
. reshape wide spend_, i(year_month_gs) j(rest_type) string
(j = food_nsa food_sa limited)

Data                               Long   ->   Wide
-----------------------------------------------------------------------------
Number of observations               33   ->   11          
Number of variables                   3   ->   4           
j variable (3 values)         rest_type   ->   (dropped)
xij variables:
                                 spend_   ->   spend_food_nsa spend_food_sa spe
> nd_limited
-----------------------------------------------------------------------------

.         
. save `census_2024', replace
(file /scratch/jtatarka/14534721/St3609585.000014 not found)
file /scratch/jtatarka/14534721/St3609585.000014 saved as .dta format

. 
. tempfile census

. 
. forval yr = 1992/2023 {
  2.         append using `census_`yr''
  3. }

. 
. sort year_month_gs 

. save `census', replace
(file /scratch/jtatarka/14534721/St3609585.000015 not found)
file /scratch/jtatarka/14534721/St3609585.000015 saved as .dta format

. 
. ************* Get BLS total # of employees for restaurants (Naics 7225)
. tempfile bls_7225

. import excel "$raw_root/bls_emp/restaurants_emp_nsa_feb_2025.xlsx", clear fir
> strow cellrange(A13:D407) 
(4 vars, 394 obs)

. 
. replace Period = substr(Period,2,2)
(394 real changes made)

. destring Period, replace
Period: all characters numeric; replaced as byte

. gen year_month_gs = ym(Year, Period)

. format year_month_gs %tm

. rename Value emp_rest 

. replace emp_rest = emp_rest*1000
(394 real changes made)

. keep year_month_gs emp_rest

. 
. save `bls_7225', replace
(file /scratch/jtatarka/14534721/St3609585.000016 not found)
file /scratch/jtatarka/14534721/St3609585.000016 saved as .dta format

. 
. ****************** BLS aggregate hours of emp for naics code 722511 (Full-Ser
> vice Restaurants)
. tempfile bls_722511

. import excel "$raw_root/bls_emp/full_service_emp_nsa_feb_2025.xlsx", clear fi
> rstrow cellrange(A13:D407) 
(4 vars, 394 obs)

. 
. replace Period = substr(Period,2,2)
(394 real changes made)

. destring Period, replace
Period: all characters numeric; replaced as byte

. gen year_month_gs = ym(Year, Period)

. format year_month_gs %tm

. rename Value emp_full 

. replace emp_full = emp_full*1000
(394 real changes made)

. keep year_month_gs emp_full

. save `bls_722511', replace
(file /scratch/jtatarka/14534721/St3609585.000017 not found)
file /scratch/jtatarka/14534721/St3609585.000017 saved as .dta format

. 
. ****************** BLS aggregate hours of emp for Food and Drink Places (NAIC
> S 722) SEASONALLY ADJUSTED
. tempfile bls_722_sa

. import excel "${raw_root}/bls_emp/food_service_emp_sa_feb_2025.xlsx", clear f
> irstrow cellrange(A13:D407) 
(4 vars, 394 obs)

. 
. replace Period = substr(Period,2,2)
(394 real changes made)

. destring Period, replace
Period: all characters numeric; replaced as byte

. gen year_month_gs = ym(Year, Period)

. format year_month_gs %tm

. rename Value emp_food_sa 

. replace emp_food_sa = emp_food_sa*1000
(394 real changes made)

. keep year_month_gs emp_food_sa

. save `bls_722_sa', replace
(file /scratch/jtatarka/14534721/St3609585.000018 not found)
file /scratch/jtatarka/14534721/St3609585.000018 saved as .dta format

. 
. ****************** BLS aggregate hours of emp for Food and Drink Places (NAIC
> S 722) NOT SEASONALLY ADJUSTED
. tempfile bls_722_nsa

. import excel "${raw_root}/bls_emp/food_service_emp_nsa_feb_2025.xlsx", clear 
> firstrow cellrange(A13:D407) 
(4 vars, 394 obs)

. 
. replace Period = substr(Period,2,2)
(394 real changes made)

. destring Period, replace
Period: all characters numeric; replaced as byte

. gen year_month_gs = ym(Year, Period)

. format year_month_gs %tm

. rename Value emp_food_nsa 

. replace emp_food_nsa = emp_food_nsa*1000
(394 real changes made)

. keep year_month_gs emp_food_nsa

. save `bls_722_nsa', replace
(file /scratch/jtatarka/14534721/St3609585.000019 not found)
file /scratch/jtatarka/14534721/St3609585.000019 saved as .dta format

. 
. 
. merge 1:1 year_month_gs using `bls_7225', nogen 

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               394  
    -----------------------------------------

. merge 1:1 year_month_gs using `bls_722511', nogen 

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               394  
    -----------------------------------------

. merge 1:1 year_month_gs using `bls_722_sa', nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               394  
    -----------------------------------------

. 
. tempfile bls_emp

. ** Create employees for limited service eating places by subtracting the full
>  service employees from all restaurant (naics 7225) employees
. gen emp_limited = emp_rest - emp_full

. keep year_month_gs emp_limited emp_food_sa emp_food_nsa

. save `bls_emp', replace
(file /scratch/jtatarka/14534721/St3609585.00001a not found)
file /scratch/jtatarka/14534721/St3609585.00001a saved as .dta format

. 
. *****************************************************************************
> ***
. ****** Merge Everything Together
. use `census', clear

. 
. merge 1:1 year_month_gs using `bls_emp', nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             1
        from master                         1  
        from using                          0  

    Matched                               394  
    -----------------------------------------

. merge 1:1 year_month_gs using `sg', nogen 

    Result                      Number of obs
    -----------------------------------------
    Not matched                           347
        from master                       347  
        from using                          0  

    Matched                                48  
    -----------------------------------------

. merge 1:1 year_month_gs using `deflators', nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             1
        from master                         0  
        from using                          1  

    Matched                               395  
    -----------------------------------------

. keep if year_month_gs >= monthly("jan1992", "MY")
(0 observations deleted)

. 
. *****************************************************************************
> ***
. ********** Start putting everything together and making graphs 
. 
. * Step 1 - Deflate Census Spend (SG Spend is already deflated)
. foreach var of varlist spend_limited spend_food_sa spend_food_nsa {
  2.         gen nominal_`var' = `var'
  3. } 
(1 missing value generated)
(1 missing value generated)
(1 missing value generated)

. replace spend_limited = (100/cpi_limited)*spend_limited 
(395 real changes made, 71 to missing)

. replace spend_food_sa = (100/cpi_food_sa)*spend_food_sa
(394 real changes made)

. replace spend_food_nsa = (100/cpi_food_nsa)*spend_food_nsa 
(394 real changes made)

. gen spend_sg_food_cpi = (100/cpi_food_nsa)*nominal_spend_sg
(348 missing values generated)

. gen spend_limited_food_cpi = (100/cpi_food_nsa)*nominal_spend_limited
(1 missing value generated)

. 
. * Step 2 - gen spend prod and visits prod 
. gen prod_sg = spend_sg/emp_sg 
(348 missing values generated)

. gen visits_prod_sg = visits_sg/emp_sg 
(348 missing values generated)

. gen prod_food_sa = spend_food_sa/emp_food_sa
(2 missing values generated)

. gen prod_food_nsa = spend_food_nsa/emp_food_nsa 
(2 missing values generated)

. gen prod_sg_food_cpi = spend_sg_food_cpi/emp_sg 
(348 missing values generated)

. gen prod_limited_food_cpi = spend_limited_food_cpi/emp_limited 
(2 missing values generated)

. gen prod_limited = spend_limited/emp_limited 
(73 missing values generated)

. 
. ******************
. ** Index to 1992 Avg 
. sort year_month_gs

. foreach var of varlist prod_food_sa prod_food_nsa prod_limited_food_cpi {
  2.         egen `var'_1992 = mean(`var') if year_month_gs <= monthly("dec1992
> ", "MY")
  3.         gen `var'_idx1992 = 100*(`var'/`var'_1992[1])
  4.         drop `var'_1992
  5. }
(384 missing values generated)
(2 missing values generated)
(384 missing values generated)
(2 missing values generated)
(384 missing values generated)
(2 missing values generated)

. 
. *****************
. *** Index to 2019 Avg 
. sort year_month_gs

. foreach var of varlist prod_limited prod_limited_food_cpi prod_sg prod_sg_foo
> d_cpi visits_prod_sg spend_limited emp_limited spend_sg visits_sg emp_sg {
  2.         egen `var'_2019 = mean(`var') if year_month_gs <= monthly("dec2019
> ", "MY") & year_month_gs >= monthly("jan2019", "MY")
  3.         egen m`var'_2019 = max(`var'_2019)
  4.         gen `var'_idx2019 = 100*(`var'/m`var'_2019)
  5.         drop `var'_2019 m`var'_2019
  6. }
(384 missing values generated)
(73 missing values generated)
(384 missing values generated)
(2 missing values generated)
(384 missing values generated)
(348 missing values generated)
(384 missing values generated)
(348 missing values generated)
(384 missing values generated)
(348 missing values generated)
(384 missing values generated)
(72 missing values generated)
(384 missing values generated)
(2 missing values generated)
(384 missing values generated)
(348 missing values generated)
(384 missing values generated)
(348 missing values generated)
(384 missing values generated)
(348 missing values generated)

. 
. label var year_month_gs "Year-Month"

. label var spend_sg_idx2019 "SafeGraph Sales"

. label var visits_sg_idx2019 "SafeGraph Visits"

. label var emp_sg_idx2019 "SafeGraph Employees"

. label var spend_limited_idx2019 "Census Sales"

. label var emp_limited_idx2019 "BLS Employees"

. label var prod_limited_idx2019 "Census/BLS Spend Productivity"

. label var prod_sg_idx2019 "SafeGraph Spend Productivity"

. label var visits_prod_sg_idx2019 "SafeGraph Visits Productivity"

. label var prod_limited_food_cpi_idx2019 "Census/BLS Productivity (Food away f
> rom home CPI)"

. label var prod_sg_food_cpi_idx2019 "SG Productivity (Food away from home CPI)
> "

. 
. *************************
. *** Save Dataset
. *************************
. 
. save "${data_root}/aggregates_build.dta", replace
file
    /project/fagoolsb/service_industries/replication_package/datasets/built/a
    > ggregates_build.dta saved

. 
end of do-file


. 